<template>
  <div>
    <el-dropdown trigger="hover">
      <el-button type="text" icon="el-icon-s-operation" style="margin-left:10px" class='buttonmore'>更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
      <el-dropdown-menu>
        <el-dropdown-item icon="el-icon-plus" @click.native="openGapDialog()">差距与改进</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <tl-manager-edit ref="managerEditForm"></tl-manager-edit>
  </div>
</template>

<script>
import tlManagerEdit from '@/views/mpm/mpmProjectTaskFeedback/managerEdit'
import { getAction, putAction, postAction, deleteAction } from '@tapui/utils/http'
export default {
    components: { tlManagerEdit },
    data() {
        return {
        url: {
            queryTask: 'mpm/projectTask/list'
        }
        }
    },
  props: {
    row: Object
  },
  methods: {
    openGapDialog() {
        let id = this.row.id
      getAction(this.url.queryTask, { qry_taskid: id.substring(0, id.length - 1) }).then(res => {
        if (res.success && res.result.dataList.length > 0) {
          this.$refs.managerEditForm.taskInfo = res.result.dataList[0]
          this.$refs.managerEditForm.isAdd = true
          this.$refs.managerEditForm.visible = true
          this.$refs.managerEditForm.disableEditSubmit = false
        } else {
          this.$tap.alert(res.message, 'warning')
        }
      })
    }
  }
}
</script>
